import request from '@/utils/request'

// 查询事件数量
export function getEventTotal(query) {
  return request({
    url: '/data/emergency/command/map/getEventTotal',
    method: 'post',
    data: query
  })
}

// 新增事件
export function commandAddEvent(query) {
  return request({
    url: '/data/emergency/command/map/addEvent',
    method: 'post',
    data: query
  })
}

// 分页查询事件信息
export function getListPageEvent(query) {
  return request({
    url: '/data/emergency/command/map/listPageEvent',
    method: 'post',
    data: query
  })
}

// 根据主键查询事件信息
export function getEventById(id) {
  return request({
    url: `/data/emergency/command/map/getEventById/${id}`,
    method: 'get'
  })
}

// 修改事件信息
export function getUpdateEvent(query) {
  return request({
    url: '/data/emergency/command/map/updateEvent',
    method: 'put',
    data: query
  })
}

// 删除事件信息
export function removeEvent(ids) {
  return request({
    url: `/data/emergency/command/map/removeEvent/${ids}`,
    method: 'delete'
  })
}

// 获取geojson
export function getMapGeojson(query) {
  return request({
    url: '/data/emergency/command/map/geojson',
    method: 'post',
    data: query
  })
}
// 获取灾害点
export function getHazardPointNames(query) {
  return request({
    url: '/data/emergency/command/map/getHazardPoint',
    method: 'get',
    params: query
  })
}

// 获取指定半径圆内所有信息
export function getInfoInCircle(query) {
  return request({
    url: '/data/emergency/command/map/getInfoInCircle',
    method: 'get',
    params: query
  })
}

// 获取最优路线规划
export function getLinePlanning(query) {
  return request({
    url: '/data/emergency/command/map/getLinePlanning',
    method: 'get',
    params: query
  })
}

// 分页获取会议记录
export function listPageMeetingRecord(query) {
  return request({
    url: '/meeting/listPageMeetingRecord',
    method: 'get',
    params: query
  })
}

// 结束会议 /meeting/dismiss
export function meetingDismiss(query) {
  return request({
    url: '/meeting/dismiss',
    method: 'post',
    data: query
  })
}
// 取消会议
export function meetingCancel(query) {
  return request({
    url: '/meeting/cancel',
    method: 'post',
    data: query
  })
}
// 删除会议记录
export function removeMeetingRecord(ids) {
  return request({
    url: `/meeting/removeMeetingRecord/${ids}`,
    method: 'delete'
  })
}
// 已读会议提示信息/meeting/readMeetingMsg/{id}
export function readMeetingMsg(id) {
  return request({
    url: `/meeting/readMeetingMsg/${id}`,
    method: 'put'
  })
}

// 获取会议记录
export function getMeetingRecord(id) {
  return request({
    url: `/meeting/getMeetingRecord/${id}`,
    method: 'get'
  })
}
